#include <my_head.h>

int main(int argc, const char *argv[]){
    int fd1 = open("fifo1", O_RDONLY);
    int fd2 = open("fifo2", O_RDONLY);
    int fd3 = open("fifo3", O_RDONLY);

    char buff[128] = {0};
    while(1){
        read(fd1, buff, sizeof(buff));
        printf("[%s]\n", buff);
        read(fd2, buff, sizeof(buff));
        printf("[%s]\n", buff);
        read(fd3, buff, sizeof(buff));
        printf("[%s]\n", buff);
    }

    close(fd1);
    close(fd2);
    close(fd3);

    return 0;
}